package com.villaday.idf.adapter;

import android.content.Context;
import android.view.View;

import com.villaday.idf.R;
import com.villaday.idf.base.AbsRecyclerViewAdapter;
import com.villaday.idf.base.OnAdapterCallbackListener;
import com.villaday.idf.model.PresellEntity;

/**
 * 首页动态列表
 */

public class HomeListSaleHeadAdapter extends AbsRecyclerViewAdapter<PresellEntity.BodyEntity.RecomendListEntity.ListEntityX> {
    private OnAdapterCallbackListener onAdapterCallbackListener;
    private View.OnClickListener onClickListener;

    public HomeListSaleHeadAdapter(Context context, OnAdapterCallbackListener onAdapterCallbackListener, View.OnClickListener onClickListener) {
        super(context,  R.layout.item_home_sale);
        this.onAdapterCallbackListener = onAdapterCallbackListener;
        this.onClickListener = onClickListener;
    }

    @Override
    public int getItemType(PresellEntity.BodyEntity.RecomendListEntity.ListEntityX d) {
        return d.getMyType();
    }

    @Override
    public void onBindHolder(AbsRecyclerViewAdapter.RecyclerViewHolder holder, PresellEntity.BodyEntity.RecomendListEntity.ListEntityX d, int position) {
        switch (d.getMyType()) {

            case 0: {//商品素材
               /* holder.setClickListenerAndTag(R.id.img_collect, onClickListener, position)
                        .setClickListenerAndTag(R.id.tv_erweima, onClickListener, position)
                        .setClickListenerAndTag(R.id.tv_share1, onClickListener, position);
                FoldTextView ftv = (FoldTextView) holder.getView(R.id.ftv);
                ftv.setText("111111123111111123阿斯顿发阿斯顿发送到大111111123阿斯顿发阿斯顿发送到大111111123阿斯顿发阿斯顿发送到大111111123阿斯顿发阿斯顿发送到大111111123阿斯顿发阿斯顿发送到大阿斯顿发阿斯顿发送到大。厦法定阿萨【德法师打发斯蒂芬撒地】方阿萨德法师打发斯问问蒂芬撒地方阿萨德法师打发斯蒂。芬撒地方发送到发送到发送到发送到发送到发送，到发送到发送到发送到，发送111111123阿斯顿发阿斯顿发送到大。厦法定阿萨【德法师打发斯蒂芬撒地】方阿萨德法师打发斯问问蒂芬撒地方阿萨德法师打发斯蒂。芬撒地方发送到发送到发送到发送到发送到发送，到发送到发送到发送到，发送");
*/
            }
            break;


        }
    }
}
